home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libhesiod0.postinst < prev    next >
Encoding:
Text File  |  2009-03-18  |  1.3 KB  |  48 lines

  1. #!/bin/sh -e
  2.  
  3. # Source debconf library.
  4. . /usr/share/debconf/confmodule
  5.  
  6. db_version 2.0
  7. db_get hesiod/rhs
  8. rhs="$RET"
  9. db_get hesiod/lhs
  10. lhs="$RET"
  11. db_get hesiod/classes
  12. classes="$RET"
  13.  
  14. hesconf=/etc/hesiod.conf
  15.  
  16. if test "$1" = configure -a -z "$2"; then
  17. # If we don't have a hesiod.conf file yet, go ahead and populate it.
  18.   if [ ! -f $hesconf ]; then
  19.     echo "# This file determines the behavior of the Hesiod library." > $hesconf
  20.     echo >> $hesconf
  21.     echo "# This line should pretty much always be the same, unless you have a" >> $hesconf
  22.     echo "# funny environment." >> $hesconf
  23.     echo "lhs=$lhs" >> $hesconf
  24.     echo >> $hesconf
  25.     echo "# This determines the Hesiod domain.  You must specify an rhs line." >> $hesconf
  26.     echo "rhs=$rhs" >> $hesconf
  27.     echo >> $hesconf
  28.     echo "# This line specifies the class search order.  You can reverse the" >> $hesconf
  29.     echo "# order or leave out IN or HS if you want.  Don't add spaces after the" >> $hesconf
  30.     echo "# beginning of the value." >> $hesconf
  31.     echo "classes=$classes" >> $hesconf
  32.   else
  33.     sed -e "s/^lhs=.*/lhs=$lhs/" \
  34.     -e "s/^rhs=.*/rhs=$rhs/" \
  35.     -e "s/^classes=.*/classes=$classes/" \
  36.     -i $hesconf
  37.   fi
  38. fi
  39.  
  40. # Automatically added by dh_makeshlibs
  41. if [ "$1" = "configure" ]; then
  42.     ldconfig
  43. fi
  44. # End automatically added section
  45.  
  46.  
  47. exit 0
  48.